﻿using System;
using System.Collections;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;


public partial class listaContratos : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["terc_cod"] == null)
        {
            Response.Redirect("Default.aspx");
            Response.End();
        }
        

        String tableOcorrencia = "<table id='table_consulta_usuario' cellpadding='0' cellspacing='1' class='grid' style='width: 700px;'><thead>" +
         "<tr>" +
             "<th><center>Código</center></th>" +
             "<th><center>Largadouro</center></th>" +
             "<th><center>Bairro</center></th>" +
             "<th><center>Ponto de Referência</center></th>" +
             "<th><center></center></th>" +
             "<th width='20px'><center></center></th>" +
             "</tr>" +
         "</thead>" +
         "<tbody>";
            try
            {

                RepositorioOcorrencia repOcorrencia = new RepositorioOcorrencia();
                int ter_cod = int.Parse(Session["terc_cod"].ToString());
                tableOcorrencia += repOcorrencia.retornaOcorrenciasTerceiros(ter_cod);
            }
            catch (Exception exp)
            {

            }
          tableOcorrencia += "</tbody> </table>";
        table.Text = tableOcorrencia;
    }
}
